home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QRZ! Ham Radio 8
/
QRZ Ham Radio Callsign Database - Volume 8.iso
/
mac
/
files
/
dsp
/
56000tar.z
/
56000tar
/
56000
/
flts
/
iir1.hlp
< prev
next >
Wrap
Text File
|
1991-11-26
|
2KB
|
70 lines
2 IIR1
Name: IIR1.ASM
Type: Assembler Macro
Version: 1.0
Date Entered: 15-Jul-87
Last Change: 15-Jul-87
Description: Direct Form Second Order All Pole Filter
This macro implements a second order all pole IIR filter.
The difference equation for the filter is:
y(n)= x(n) + a(1)y(n-1) + a(2)y(n-2)
with z transform:
Y(z) 1
----- = -------------------------
X(z) -1 -2
1 - a(1) z - a(2) z
where:
x(n) = input sample at time nT
y(n) = output of the filter at time nT
a(n) = filter coefficient n
T = sample period
An example network to realize this filter is shown below.
Input
>----------(+)------------------------> Output
x(n) ^ | y(n)
| a(1) 1/z
(+)<-- 0.8 -----|
^ |
| a(2) 1/z
(+)<-- -0.3 ----|
Second Order Direct Form All Pole IIR Filter
The coefficients in the example are arbitrary. The memory
map for the filter is shown below:
r0
|
v
-------------------
X: | | |
| y(n-1) | y(n-2) | Filter States
-------------------
y(n-1) y(n-2)
--------------------
Y: | a(1) | a(2) |
| .8 | -.3 | Filter Coefficients
--------------------
^
|
r4
Memory Map for the Second Order All Pole Filter
The modulo registers m0 and m4 are set to -1 for linear
arithmetic. The coefficients in this filter are restricted to
a magnitude less than one.
For an example of how to use this macro, see the test
program IIR1T.ASM.